package klis.mantianx.controller;

import klis.mantianx.utils.JsonUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * @author starrysky
 * @title: MyController
 * @projectName springMvc_Parent
 * @description: TODO
 * @date 2021/2/516:15
 */
@Controller
public class MyController {
    @GetMapping("/testDate")
    @ResponseBody
    public String getDate(){
        return JsonUtils.toDateFormat(new Date(),"yyyy-MM-dd HH:mm:ss");
    }
}
